<div ng-init="init();" class="kmi-layout-content SMT26-content">
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <i class="material-icons">&#xE408;</i>
            <div class="kmi-can-click"></div>
        </div>
        <div class="header-title" ng-bind="'SMT26.title' | translate"></div>
        <div class="header-logo"></div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page">
            <!-- 物料編號 -->
            <div class="kmi-report-panel"></div>
            <div class="kmi-list column-selector">
                <div class="kmi-list__header">
                    <div class="kmi-list__column" style="flex:0 0 40px"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_need_list.title' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_need_list.need_no' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_need_list.work_no' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_need_list.station_no' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_need_list.eqp_no' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_need_list.check_time' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_need_list.close_time' | translate"></div>
                </div>
                <div class="kmi-list__row-content">
                    <div class="kmi-list__row" ng-repeat="item in pick_list track by $index">
                        <div class="kmi-list__column" style="flex:0 0 40px;" ng-click="getContent(item)">
                            <button class="mdl-button mdl-js-button mdl-button--icon">
                                <img ng-show="!item.is_selected" src="image/icons/check0.png"></img>
                                <img ng-show="item.is_selected" src="image/icons/check1.png"></img>
                            </button>
                        </div>
                        <div class="kmi-list__column  column-border" style="flex:1;" ng-bind="item.picklist_type"></div>
                        <div class="kmi-list__column  column-border" style="flex:1;" ng-bind="item.picklist_id"></div>
						<div class="kmi-list__column  column-border" style="flex:1;" ng-bind="item.mo_no"></div>
						<div class="kmi-list__column  column-border" style="flex:1;" ng-bind="item.op_no"></div>
                        <div class="kmi-list__column  column-border" style="flex:1;" ng-bind="item.eqp_no"></div>
                        <div class="kmi-list__column  column-border" style="flex:1;" ng-bind="item.create_date"></div>
                        <div class="kmi-list__column  column-border" style="flex:1;">
                            <div class="kmi-button kmi-button-confrim" ng-click="closeItem(item,$index,$event);" style="width:100px">
                                <label ng-bind="'SMT26.material_need_list.close_time' | translate"></label>
                                <div class="kmi-can-click"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 捲料編號 -->
            <div class="header-panel-column">
                <div class="kmi-text-fields" style="margin: 8px 0;flex: 1;">
                    <label class="label" ng-bind="'SMT26.reel_no' | translate"></label>
                    <input style="margin-left: 8px;" mdl-barcode="input_barcode(barcode)" ng-disabled='detail_list.length=="0"'/>
                    <div class="tip qrcode" ng-click="QRCodeScanner();">
                        <img src="image/icons/QRCode.png">
                    </div>
                </div>
                <div class="kmi-text-fields" style="margin: 8px 0;flex: 1;">
                    <label class="label" ng-bind="'SMT26.need_qty' | translate"></label>
                    <label ng-bind="real_need_qty"></label>
                </div>
            </div>
            <div class="header-panel-column">
                <div class="kmi-text-fields" style="margin: 8px 0;flex: 1;padding: 0 10px;">
                    <!-- 捲料編號 -->
                    <div class="reel_item">
                        <label class="label" ng-bind="'SMT26.reel_no' | translate"></label>
                        <label ng-bind='reel_info[0].reel_no'></label>
                    </div>
                    <!-- 物料編號 -->
                    <div class="reel_item">
                        <label class="label" ng-bind="'SMT26.material_no' | translate"></label>
                        <label ng-bind='reel_info[0].material_no'></label>
                    </div>
                    <!-- 數量 -->
                    <div class="reel_item">
                        <label class="label" ng-bind="'SMT26.qty' | translate"></label>
                        <label ng-bind='reel_info[0].actual_qty'></label>
                    </div>
                    <!-- 製造商 -->
                    <div class="reel_item">
                        <label class="label" ng-bind="'SMT26.manufactor' | translate"></label>
                        <label ng-bind='reel_info[0].mnf'></label>
                    </div>
                    <!-- 製造批次號 -->
                    <div class="reel_item">
                        <label class="label" ng-bind="'SMT26.produce_time_no' | translate"></label>
                        <label ng-bind='reel_info[0].mnf_lotno'></label>
                    </div>
                    <!-- MSD管理 -->
                    <div class="reel_item">
                        <label class="label" ng-bind="'SMT26.MSD' | translate"></label>
                        <label ng-bind="reel_info[0].is_msd"></label>  
                    </div>
                </div>
                <div class="kmi-button kmi-button-confrim btn-confirm" ng-click="choose()"
                    style="width:100px;margin-left: 40px;">
                    <label ng-bind="'SMT26.choose' | translate"></label>
                    <div class="kmi-can-click"></div>
                </div>
            </div>
            <div class="kmi-list column-selector">
                <div class="kmi-list__header">
                    <!-- <div class="kmi-list__column" style="flex:0 0 40px;"></div> -->
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_check.pos_no' | translate"></div>
					<div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_check.material_no' | translate"></div>
					<div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_check.qty' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_check.reel_no' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_check.actual_qty' | translate"></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'SMT26.material_check.check_time' | translate"></div>
                </div>
                <div class="kmi-list__row-content">
                    <div class="kmi-list__row"
                         ng-repeat="item in detail_list track by $index">
                         <!-- <div class="kmi-list__column column-border" style="flex:0 0 40px;">
                            <button class="mdl-button mdl-button--icon" ng-click="deleteItem(item,$index)">
                                <img src="image/icons/delete.png">
                            </button>
                        </div> -->
						<div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.slot_no"></div>
						<div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.material_no"></div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.amount_need"></div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.reel_no"></div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.amount"></div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.time_stamp"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="kmi-layout-footer">
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1"
                    ng-click="confirm();" ng-disabled="selectedList.length==0">
                <i class="material-icons">done</i>
            </button>
        </div>
    </div>
</div>
